Skip to content

Conversation

@erikbocks
Copy link
Collaborator

Description

Currently, the createCondition command belongs to a class named as CreateConditionCmd. This class has a very abstract name and does not define what is the purpose of the condition. Thus, this PR renames CreateConditionCmd class to CreateConditionForVmAutoScalingCmd, helping developers to understand the class purpose without having to access it.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

I built the packages with the changes, applied them in my local environment and called the API createCondition via CloudMonkey and validated that everything works as intended. Unitary tests were also executed and they passed successfully.

How did you try to break this feature and the system with this change?

@DaanHoogland
Copy link
Contributor

@erikbocks , sensible change but I would leave out the “Vm” bit from the new name. “CreateConditionForAutoScalingCmd” seems more appropriate as the VM is not scaled itself but the service is scaled by adding more (or less) VMs.What do you think? cc @weizhouapache @shwstppr .

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 42.10526% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.56%. Comparing base (2dbc86a) to head (eb872b9).

Files with missing lines Patch % Lines
...in/java/com/cloud/server/ManagementServerImpl.java 0.00% 7 Missing ⚠️
...and/admin/autoscale/DeleteAutoScaleCounterCmd.java 0.00% 1 Missing ⚠️
...nd/user/autoscale/DeleteAutoScaleConditionCmd.java 0.00% 1 Missing ⚠️
...and/user/autoscale/ListAutoScaleConditionsCmd.java 0.00% 1 Missing ⚠️
...ava/com/cloud/network/as/AutoScaleManagerImpl.java 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11819   +/-   ##
=========================================
  Coverage     17.56%   17.56%           
+ Complexity    15542    15541    -1     
=========================================
  Files          5909     5909           
  Lines        529058   529058           
  Branches      64617    64617           
=========================================
+ Hits          92922    92942   +20     
+ Misses       425683   425661   -22     
- Partials      10453    10455    +2     
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests 18.63% <42.10%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@weizhouapache
Copy link
Member

@erikbocks , sensible change but I would leave out the “Vm” bit from the new name. “CreateConditionForAutoScalingCmd” seems more appropriate as the VM is not scaled itself but the service is scaled by adding more (or less) VMs.What do you think? cc @weizhouapache @shwstppr .

maybe use CreateAutoScaleCondition which consistent with other files:

createAutoScalePolicy
createAutoScaleVmProfile
createAutoScaleVmGroup

@shwstppr
Copy link
Contributor

@DaanHoogland I don't have a strong preference either way. I don't even mind class remain CreateCondition as personally I find it easier during troubleshooting to search the class with API name.
@weizhouapache suggestion also makes sense as it keeps naming concise.

@DaanHoogland
Copy link
Contributor

I like @weizhouapache ’s name best, CreateAutoScaleCondition. @erikbocks , what do you think? cc @shwstppr

@erikbocks
Copy link
Collaborator Author

I agree with the CreateAutoScaleCondition class name, and I will try to work in this PR later.

@weizhouapache
Copy link
Member

I agree with the CreateAutoScaleCondition class name, and I will try to work in this PR later.

can you please also change the other classes for AS condition ? Update, Delete, List ?

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@erik-bock-silva erik-bock-silva force-pushed the rename-create-condition-command-class-name branch from 16a6b0f to bdce6c0 Compare October 27, 2025 12:33
@erikbocks
Copy link
Collaborator Author

@DaanHoogland @weizhouapache, I renamed the other classes names, could you check them now?

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHoogland
Copy link
Contributor

@shwstppr @weizhouapache , can we continue with this or are there any impediments?

@weizhouapache
Copy link
Member

@shwstppr @weizhouapache , can we continue with this or are there any impediments?

we can continue

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15577

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-14738)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants